<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>博客管理后台-{% block title %}首页{% endblock %}</title>
    <link rel="stylesheet" href="{{ url_for('static', filename='css/style.css') }}">
    <link rel="stylesheet" href="{{ url_for('static', filename='bootstrap/css/bootstrap.min.css') }}">
    <script src="{{ url_for('static', filename='jquery/jquery-3.7.1.min.js') }}"></script>
    <script src="{{ url_for('static', filename='bootstrap/js/bootstrap.min.js') }}"></script>

    {% block head %}{% endblock %}
    <style>
        a {
            text-decoration: none;
            color:black;
        }
        a:hover, a:focus { text-decoration: none; }
        body, html { height: 100%; overflow-x: hidden; }
        body { margin: 0; }

    </style>
</head>
<body>
    <!-- 顶部导航栏 -->
    <div class="row">
        <div class="col-md-12 d-flex justify-content-between align-items-center"
             style="background-color: #122b40; height: 60px; padding: 0 20px;
                    color: white; position: fixed; top: 0; left: 0; right: 0; z-index: 999;">
            <div class="col-md-2">
                <div style="font-size: 25px;margin-top: 20px;align-items: center;font-family: 华文楷体;">Likt 博客后台</div>
            </div>
            <div class="col-md-2 col-md-offset-8">
                <div class="col-md-1">
                    {% if user %}
                    <p class="" style="color: whitesmoke;font-family: '华文楷体'; margin-top: 20px;margin-left: 30px">
                        hello,{{ user.username }}
                    </p>
                    {% endif %}
                </div>
                <div class="col-md-1">
                    <div class="dropdown" style="margin-top: 10px;margin-left: 100px">
                        <img src="{{ url_for('static', filename=user.avatar) }}"
                             class="dropdown-toggle"
                             style="height: 40px; width: 40px; border-radius: 50%; cursor: pointer;"
                             data-toggle="dropdown"
                             aria-haspopup="true"
                             aria-expanded="false">
                        <ul class="dropdown-menu dropdown-menu-right">
                            <li><a class="dropdown-item" href="{{ url_for('auth.mysetting') }}">个人中心</a></li>
                            <li><a class="dropdown-item" href="{{ url_for('auth.logout') }}">退出登录</a></li>
                        </ul>
                    </div>
                </div>
            </div>

        </div>
    </div>

    <!-- 左侧导航栏 -->
    <div class="col-md-2" style="background-color: #122b40; height: 100vh;
                                 position: fixed; top: 60px; left: 0; overflow-y: auto;">
        <!-- 发布按钮 -->
        <div class="row">
            <div class="col-md-12 text-right" style="justify-content: center;align-items: center;">
                <a href="{{ url_for('security.write_blog') }}" class="btn btn-success" style="width: 100%; height: 50px;
                font-size: 21px; margin-bottom: 10px;margin-top: 20px;padding-top: 10px;">发布博客</a>
            </div>
        </div>
        <div class="panel-group" id="accordion" role="tablist" aria-multiselectable="true" style="padding-top: 10px;">
            <div class="panel panel-default">
                <div class="panel-heading" role="tab" id="headingOne">
                    <h4 class="panel-title text-center">
                        <a role="button" data-toggle="collapse" data-parent="#accordion"
                           href="#collapseOne" aria-expanded="true" aria-controls="collapseOne">
                            博客
                        </a>
                    </h4>
                </div>
                <div id="collapseOne" class="panel-collapse collapse in" role="tabpanel" aria-labelledby="headingOne">
                    <ul class="list-group">
                        <li class="list-group-item"><a href="{{ url_for('security.blog_manager') }}">博客管理</a></li>
                        <li class="list-group-item"><a href="{{ url_for('security.category_manager') }}">分类管理</a></li>
                    </ul>
                </div>
            </div>

            <div class="panel panel-default">
                <div class="panel-heading" role="tab" id="headingTwo">
                    <h4 class="panel-title text-center">
                        <a class="collapsed" role="button" data-toggle="collapse" data-parent="#accordion"
                           href="#collapseTwo" aria-expanded="false" aria-controls="collapseTwo">
                            专题
                        </a>
                    </h4>
                </div>
                <div id="collapseTwo" class="panel-collapse collapse" role="tabpanel" aria-labelledby="headingTwo">
                    <ul class="list-group">
                        <li class="list-group-item"><a href="{{ url_for('security.topic_manager') }}">专题管理</a></li>
                        <li class="list-group-item"><a href="{{ url_for('security.detail') }}">添加专题</a></li>
                    </ul>
                </div>
            </div>

            <div class="panel panel-default">
                <div class="panel-heading" role="tab" id="headingThree">
                    <h4 class="panel-title text-center">
                        <a class="collapsed" role="button" data-toggle="collapse" data-parent="#accordion"
                           href="#collapseThree" aria-expanded="false" aria-controls="collapseThree">
                            设置
                        </a>
                    </h4>
                </div>
                <div id="collapseThree" class="panel-collapse collapse" role="tabpanel" aria-labelledby="headingThree">
                    <ul class="list-group">
                        <li class="list-group-item"><a href="{{ url_for('auth.mysetting') }}">个人信息设置</a></li>
                        <li class="list-group-item"><a href="{{ url_for('auth.sys_setting') }}">系统设置</a></li>
                        <li class="list-group-item"><a href="{{ url_for('auth.blog_member') }}">博客成员</a></li>
                        <li class="list-group-item"><a href="{{ url_for('comment.comment_manage') }}">留言管理</a></li>
                    </ul>
                </div>
            </div>

            <div class="panel panel-default">
                <div class="panel-heading" role="tab" id="headingFour">
                    <h4 class="panel-title text-center">
                        <a class="collapsed" role="button" data-toggle="collapse" data-parent="#accordion"
                           href="#collapseFour" aria-expanded="false" aria-controls="collapseFour">
                            回收站
                        </a>
                    </h4>
                </div>
                <div id="collapseFour" class="panel-collapse collapse" role="tabpanel" aria-labelledby="headingFour">
                    <ul class="list-group">
                        <li class="list-group-item"><a href="{{ url_for('security.recyler') }}">博客回收站</a></li>
                        <li class="list-group-item"><a href="{{ url_for('comment.comment_recyler') }}">留言回收站</a></li>
                    </ul>
                </div>
            </div>
        </div>
    </div>

    <!-- 主体内容区域 -->
    <div class="col-md-10" style="margin-left: 16.66666667%; margin-top: 70px;">


        <!-- 动态内容块 -->
        {% block body %}{% endblock %}
    </div>
</body>
</html>
